import request from '@/utils/request'

// 获取构筑物类型下拉列表
export function getStructureTypeList() {
  return request({
    url: '/operation/web/operationStructureSetting/structureTypeList',
    method: 'get'
  })
}

// 查询构筑物设置列表
export function getStructureList(params) {
  return request({
    url: '/operation/web/operationStructureSetting/list',
    method: 'get',
    params
  })
}

// 获取构筑物设置详细信息
export function getStructureDetail(structureId) {
  return request({
    url: `/operation/web/operationStructureSetting/${structureId}`,
    method: 'get'
  })
}

// 新增构筑物设置
export function addStructure(data) {
  return request({
    url: '/operation/web/operationStructureSetting',
    method: 'post',
    data
  })
}

// 修改构筑物设置
export function updateStructure(data) {
  return request({
    url: '/operation/web/operationStructureSetting',
    method: 'put',
    data
  })
}

// 删除构筑物设置
export function deleteStructure(structureIds) {
  return request({
    url: `/operation/web/operationStructureSetting/${structureIds}`,
    method: 'delete'
  })
}